<include file="Public/head" />
<include file="Public/menu" />
<include file="Manager/menu" />
<link href="__PUBLIC__/Admin/css/hwLayer.css" rel="stylesheet" type="text/css" />
      <div class="container">
            <div class="demo">
                <div class="optlist">
                    <a class="btn  show-layer" data-show-layer="hw-layer" role="button" style="float:right;margin-right:20px">添加新角色</a>
                </div>
                <div class="hw-overlay" id="hw-layer">
                    <div class="hw-layer-wrap">
                        <span class="glyphicon glyphicon-remove hwLayer-close"></span>
                        <div class="row">
                            <div class="col-md-9 col-sm-12">
                                
                                    <form action="{:U('Managerrole/add_role')}" method="post" class="col-md-9 col-sm-12">
                                        <font class="fontstyle">角色名称：</font><input class="ipt" type="text" name="role_name" placeholder="输入角色名称" style="border:1px solid #c2c2c2"><br><br>
                                        <font class="fontstyle">角色描述：</font><textarea name="role_desc" placeholder="输入角色详情描述" style="border:1px solid #c2c2c2;width:145px;height:100px"></textarea><br><br>
                                        
                                        <input class="btn  show-layer" type="submit"  value="保存" style="float:right">
                                    </form>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
     </div>
     <table width="100%" border="0" cellspacing="0" cellpadding="0" class="indexBoxTwo">
      <tbody>
       <tr>
        <td width="100%" valign="top" class="pr">
         <div class="indexBox">
          <div class="boxTitle">
           角色基本信息
          </div>
          <ul>
            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
            <tr>
              <th width="22" align="center"><input name='chkall' type='checkbox' id='chkall' onclick='selectcheckbox(this.form)' value='check'></th>
              <th width="40" align="center">编号</th>
              <th width="40" align="center">角色名称</th>
              <th width="150" align="center">角色描述</th>
              <th width="80" align="center">操作</th>
            </tr>
            <volist name="role_info" id="v">
               <tr>
                <td align="center"><input type="checkbox" name="checkbox[]" value="15" /></td>
                <td align="center">{$v.id}</td>
                <td align="center">{$v.role_name}</td>
                <td align="center">{$v.role_desc}</td>
                <td align="center">
                <a href="{:U('Managerrole/edit_role')}&id={$v.id}">编辑</a> | <a href="{:U('Managerrole/del_role')}&id={$v.id}">删除</a>
                </td>  
               </tr>
            </volist>
            </table>
            <div class="pager">总计 15 个记录，共 1 页，当前第 1 页 | <a href="product.php?page=1">第一页</a> 上一页 下一页 <a href="product.php?page=1">最末页</a></div>
          </ul>
         </div> </td>
        <td valign="top" class="pl">
       </tr>
      </tbody>
     </table>
    </div>
   </div>
<script src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
    $(function() {
        //展示层
        function showLayer(id) {
            var layer = $('#' + id),
                    layerwrap = layer.find('.hw-layer-wrap');
            layer.fadeIn();
            //屏幕居中
            layerwrap.css({
                'margin-top': -layerwrap.outerHeight() / 2
            });
        }

        //隐藏层
        function hideLayer() {
            $('.hw-overlay').fadeOut();
        }

        $('.hwLayer-ok,.hwLayer-cancel,.hwLayer-close').on('click', function() {
            hideLayer();
        });

        //触发弹出层
        $('.show-layer').on('click', function() {
            var layerid = $(this).data('show-layer');
            showLayer(layerid);
        });

        //点击或者触控弹出层外的半透明遮罩层，关闭弹出层
        $('.hw-overlay').on('click', function(event) {
            if (event.target == this) {
                hideLayer();
            }
        });

        //按ESC键关闭弹出层
        $(document).keyup(function(event) {
            if (event.keyCode == 27) {
                hideLayer();
            }
        });
    });
</script>
<include file="Public/footer" />